<?php defined("MAIN_DIR") or die("No direct access");

require_once APP.HEADFILE;
?>
<script type="text/javascript">
var main = true;
</script>
<script type="text/javascript" src="/files/js/bank_list.js"></script>
<h1>Банки <?php echo $current_city['city_name_rod']; ?></h1>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
	<tr>
		<td width="456" align="left" valign="top" id="ya_hochu">
			<div class="ya_hochu">Я хочу ...</div>
			<div class="ya_hochu_item"><a href="<?php echo "/$c_name";?>/banks/">Найти</a> банк и информацию о нем</div>
			<div class="ya_hochu_item"><a href="<?php echo "/$c_name";?>/credits/">Выбрать</a> подходящий кредит</div>
			<div class="ya_hochu_item"><a href="<?php echo "/$c_name";?>/deposits/">Подобрать</a> выгодную линейку вкладов и депозитов</div>
			<div class="ya_hochu_item"><a href="<?php echo "/$c_name";?>/banks/atms/">Отыскать</a> банкомат в <?php echo $current_city['city_name_pred']?></div>
			<div class="ya_hochu_item"><a href="<?php echo "/$c_name";?>/banks/vacancies/">Устроиться</a> работать в банк</div>
			<div class="ya_hochu_item"><a href="<?php echo "/$c_name";?>/mentions/">Почитать или оставить</a> отзывы о банках</div>
			<div class="ya_hochu_item"><a href="<?php echo "/$c_name";?>/polls/">Принять участие</a> в опросах</div>
			<div class="banner_start"><?php
				$main_banner = $db->getCell("select `code` from `banners` where `position` = 'main' and `power` = 'on' and `before` > '".time()."' limit 1");
				echo $main_banner;
			?></div>
		</td>
		<td width="575" align="left" valign="top">
			<div class="start_second_col"><?php
				require_once APP."bank_list.php";
				require_once APP."currency_rates.php";
				?><div style="margin-top:100px" id="bankomaty_heading">
					<a href="<?php echo "/$c_name";?>/banks/atms/">Банкоматы в <?php echo $current_city['city_name_pred']; ?></a>
				</div>
				<div id="bankomaty_banks"><?php
					$atm_res = mysql_query("select `bank`.`bank_id`,`bank`.`name` from `bank`,`atm` where `bank`.`bank_id` = `atm`.`bank_id` and `bank`.`city_id` = '$_SESSION[city]' group by `bank`.`bank_id` limit 7");
					$i = 0;
					while ($atm_row = mysql_fetch_array($atm_res))
					{
						$i++;
						?><div class="bankomaty_bank">
							<a href="<?php echo "/$c_name";?>/banks/atms/<?php echo $atm_row['bank_id']; ?>"><?php echo $atm_row['name']?></a>
						</div><?php
					}
				?></div>
				<div id="bankomaty_kruglo"><a href="<?php echo "/$c_name";?>/banks/atms/<?php echo $atm_row['bank_id']; ?>">Круглосуточные<br />банкоматы</a></div>
			</div>
		</td>
		<td width="300" align="left" valign="top"><?php
			require_once APP."rating_column.php";
			require_once APP."vacancy_column.php";
		?></td>
	</tr>
	<tr>
		<td colspan="2"><?php
			$info = mysql_fetch_array(mysql_query("select * from `info` where `info_id` = '12' limit 1"));
			$text = getRichText($info['text']);
			echo "<h2>$info[header]</h2>";
			echo "<p>$text</p>";
		?></td>
		<td>&nbsp;</td>
	</tr>
</table>
<?php include_once APP.FOOTERFILE; ?>